<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
		<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_749785_du54h857okn.css"/>
		<link rel="stylesheet" type="text/css" href="css/public.css" />
		<link rel="stylesheet" type="text/css" href="css/date.css"/>
		<link rel="stylesheet" href="css/baoxian.css" />
		<title>保险</title>
	</head>
	<body style="background: #e9ecf3;">
		<!--top-->
		<div class="baoxianP-top"><a href="javascript:history.go(-1)"><i class="iconfont icon-fanhui"></i></a>学车保险申保</div>
		<!--cont-->
		<div class="baoxianP-content">
			<div class="baoxianP-items">
				<p class="baoxianP-items-title">申保信息</p>
				<ul>
					<li class="baoxianP-items-item">
						<label class="baoxianP-items-L">申保类型</label>
						<select class="baoxianP-items-R">
							<option value="科目二">科目二</option>
						</select>
					</li>
					<li class="baoxianP-items-item">
						<label class="baoxianP-items-L">银行卡号</label>
						<input class="baoxianP-items-R long" id="backId" type="number" value="614458852365425" />
					</li>
					<li class="baoxianP-items-item">
						<label class="baoxianP-items-L">发卡银行</label>
						<select class="baoxianP-items-R">
							<option value="中国银行">中国银行</option>
						</select>
					</li>
					<li class="baoxianP-items-item">
						<label class="baoxianP-items-L">手机号码</label>
						<input class="baoxianP-items-R long" type="number" id="tel" value="13848956275" />
					</li>
					<li class="baoxianP-items-item">
						<label class="baoxianP-items-L">考试时间</label>
						<!--<input id="endTime" class="kbtn baoxianP-items-R long" placeholder="考试时间" />-->
						<input id="demo2" class="kbtn baoxianP-items-R long" type="text" readonly="" name="input_date" placeholder="考试时间" data-lcalendar="2010-01-11,2019-12-31" />
						<div id="datePlugin"></div>
						<!--<input class="baoxianP-items-R long" id="test1" type="text" value="+86 13848956275" />-->
					</li>
				</ul>
				<div class="baoxian2-tip">
					<p class="baoxian2-tip-title">提示：</p>
					<p class="baoxian2-tip-text">申保所用银行卡只限中国银行、建设银行、农业银行、工商 银行的银行卡。</p>
				</div>
			</div>
		</div>
		<!--bottom-->
		<div class="baoxianP-bottom" onclick="submit()">提  交</div>
	</body>
	<script src="js/jquery.min.js"></script>
	<script src="js/date.js"></script>
	<script src="layer/layer.js"></script>
	<script type="text/javascript">
		var calendardatetime = new lCalendar();
        calendardatetime.init({
            'trigger': '#demo2',
            'type': 'datetime'
        });
		// submit
		function submit(){
			var RegExp = /^((0\d{2,3}-\d{7,8})|(1[35847]\d{9}))$/; //验证手机格式
			if($("#backId").val().trim() == ''){
				layer.msg("银行卡号")
			} else if($("#tel").val().trim() == ''){
				layer.msg("请输入手机号")
			} else if($("#endTime").val() == ''){
				layer.msg("请输入考试时间")
			} else{
				if(RegExp.test($("#tel").val().trim()) == false) {
					layer.msg('请输入正确手机号码')
				} else{
					// 此处放提交的逻辑代码
					console.log("验证通过")
				}
			}
		}
//		$(function(){
//			$('#endTime').date({theme:"datetime"});
//		})
	</script>
</html>
